var expect = chai.expect;

describe('NumberUtil', function() {
	it('getSplitNumStr1', function() {//期望传人非number类型数据直接返回0
		expect(game.NumberUtil.getSplitNumStr("sfs")).to.equal('0');
	});
	it('getSplitNumStr2', function() {//期望能正确处理分割号
		expect(game.NumberUtil.getSplitNumStr(11000)).to.equal('11,000');
	});
	it('getSplitNumStr3', function() {//期望包含小数的数字，也能正确处理分割号
		expect(game.NumberUtil.getSplitNumStr(9999.05)).to.equal('9,999.05');
	});

	it('formatDate', function() 
	{
		var d = new Date();
		d.setTime(1492582277000);//2017/4/19 14:11:17
		expect(game.NumberUtil.formatDate(d,0)).to.equal('19/04/2017');
		expect(game.NumberUtil.formatDate(d,1)).to.equal('14:11:17');
		expect(game.NumberUtil.formatDate(d,2)).to.equal('19/04/2017 14:11:17');
	});
});
